#ifndef TEXTEDITOR_
#define TEXTEDITOR_
#include <QTextEdit>
class Splitter;
/**
 * @author ferdi
 */
class TextEditor : public QTextEdit{
Q_OBJECT
	
public:
	TextEditor(Splitter* parent = 0);
	void setBold(bool bold);
	void setItalic(bool italic);
	void setUnderline(bool underline);
	void setTextFamily(const QString& familyIdentifier);
	void setTextSize(const QString& sizeIdentifier);

protected slots:
/**
 * overriden slot from QWidget, called when the Keyboard-focus is set on this TextEditor
 */
	void focusInEvent ( QFocusEvent * event ); 
	
private slots:
/**
 * the current Char format is changed
 */
	void currentCharFormatChanged(const QTextCharFormat & format);
	void mergeFormatOnWordOrSelection(const QTextCharFormat& format);
	
private:
	Splitter* splitter;
	
	
};


#endif /*TEXTEDITOR_*/
